import http from './request'

// 获取车次列表的接口 { start, end, date, isSpped, page }
export const getTrainListApi = (data) => http.post('/api/trip/train', data)

// 获取车次详情的接口
// query 是一个对象，格式为 { start, end }
export const getTrainDetailApi = (id, query) =>
  http.get(`/api/trip/train/${id}`, { params: query })
